﻿using MongoDB.Driver;
using SDCloudSolution.SDCloud.DataLayer.MongoDb.Interfaces;

namespace SDCloudSolution.SDCloud.DataLayer.MongoDb
{
    public class SdcloudMongoClient : ISdcloudMongoClient
    {
        private readonly IMongoClient _client;

        public SdcloudMongoClient(ISdCloudMongoDbSettingsProvider settingsProvider)
        {
            _client = new MongoClient(settingsProvider.ModelResultMongoStorageConnectionString);
        }

        public IMongoDatabase GetDatabase(string databaseName)
        {
            return _client.GetDatabase(databaseName);
        }
    }
}
